class Calculator {
public static int[] genFibbo(int num) {
	
		int[] arr = new int[20];
		
		arr[0]=0;
		arr[1]=1;
		for(int i=2 ; i<num ;i++ )
			arr[i]=arr[i-1]+arr[i-2];
			
	
		return arr;
	}

	public static long SumofArray(int[] a) {	
		long sum = 0 ;
		for(int i=0;i<a.length;i++)
			sum = sum + a[i]; 
		return sum;
	}
	
	public static int[] randInt(int num) {
	int[] a = new int[num];
	for(int i = 0; i<num; i++)
		a[i]=(int) (Math.random()*100);
		return a;
	}
	
	
	public static void printDouble(double[] arr) {
			for(int i=0;i<arr.length;i++)
			System.out.print(arr[i] + ",");
	}
	
	public static void printChar(char[] arr) {
			for(int i=0;i<arr.length;i++)
			System.out.print(arr[i] + ",");
	}
	
	public static int maxArr(int[] arr) {
	
		int max=0;
		for(int i=0;i<arr.length;i++)
			if(max<arr[i])
				max = arr[i];
	
		return max;
	}
	public static int[] revInt(int[] arr) {
	
		int[] rev = new int[arr.length];
		for(int i=0;i<arr.length;i++)
				rev[arr.length-i-1] = arr[i];
	
		return rev;
	
	}
	public static char[] revChar(char[] arr) {
	
		char[] rev = new char[arr.length];
		for(int i=0;i<arr.length;i++)
				rev[arr.length-i-1] = arr[i];
	
		return rev;
	
	}
	
	public static int countVowel(char[] arr) {
	
		int count=0;
		for(int i=0;i<arr.length;i++)
				if(arr[i]=='a'||arr[i]=='e'||arr[i]=='i'||arr[i]=='o'||arr[i]=='u'||
					arr[i]=='A'||arr[i]=='E'||arr[i]=='I'||arr[i]=='O'||arr[i]=='U')
					count++;
	
		return count;
	}
	
	public static int[] genEven(int num1,int num2) {
	
		int[] arr = new int[50];
		for(int i=num1,j=0;i<=num2;i++,j++)
			if(i%2==0)
				arr[j]=i;
			else
				j--;
		return arr;
	}
	
	
	public static int[] genOdd(int num1,int num2) {
	
		int[] arr = new int[50];
		for(int i=num1,j=0;i<=num2;i++,j++)
			if(!(i%2==0))
				arr[j]=i;
			else
				j--;
		return arr;
	}
	
	public static int[] genPrime(int num1,int num2) {
	
		int[] arr = new int[50];
		for(int i=num1,j=0;i<=num2;i++,j++)
			if(isPrime(i))
				arr[j]=i;
			else
				j--;
		return arr;
	}
	public static boolean isPrime(long num) {
		boolean result = false;
		long count = 0;
		long i=2;
		while(i <= num/2) {
		
			if(num%i == 0)
				count++;
			i++;
		}
		if(count == 0 && num != 1 && num != 0)
			result = true;
		return result;
	}
	
	
}